package com.xy.improve;

/**
 * @author 谢阳
 * @version 1.8.0_131
 * @date 2022/6/18 16:35
 * @description
 */
public class UserForPhone implements User {
    private String name;
    private BilibiliUploader bilibiliUploader;

    public UserForPhone(String name) {
        this.name = name;
    }

    public void followUp(BilibiliUploader bilibiliUploader) {
        this.bilibiliUploader = bilibiliUploader;
        bilibiliUploader.followFan(this);
    }

    public void unFollow(BilibiliUploader bilibiliUploader) {
        // 空
    }

    @Override
    public void update() {
        System.out.println("弹窗通知 你关注的Up主【" + bilibiliUploader.getName() + "】更新了" + bilibiliUploader.getVideo());
    }

    @Override
    public String getName() {
        return name;
    }
}
